package com.yupi.usercenter.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.usercenter.base.model.BaseController;
import com.yupi.usercenter.base.model.Result;
import com.yupi.usercenter.feign.open.MonitorWoFeignClient;
import com.yupi.usercenter.model.dto.*;
import com.yupi.usercenter.model.vo.MonitorWoDetailVO;
import com.yupi.usercenter.model.vo.MonitorWoExcelVO;
import com.yupi.usercenter.model.vo.MonitorWoPageVO;
import com.yupi.usercenter.service.IMonitorWoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 监控工单表 前端控制器
 *
 * @author cc
 * @version 1.0.0
 * @date Created in 2025年7月11日17:03:19
 */
//(tags = "监控工单表")
@RestController
@RequestMapping("/monitorWo")
public class MonitorWoController extends BaseController implements MonitorWoFeignClient {

    @Autowired
    private IMonitorWoService  service;

    @Override
    public Result<Page<MonitorWoPageVO>> page(MonitorWoPageDTO dto) {
        return success(service.page(dto));
    }

    @Override
    public Result<MonitorWoDetailVO> detail(MonitorWoDetailDTO dto) {
        return success(service.detail(dto));
    }

    @Override
    public Result<Boolean> add(MonitorWoAddDTO dto) {
        return success(service.add(dto));
    }

    @Override
    public Result<Boolean> edit(MonitorWoEditDTO dto) {
        return success(service.edit(dto));
    }

    @Override
    public Result<Boolean> delete(MonitorWoDeleteDTO dto) {
        return success(service.delete(dto));
    }

    @Override
    public Result<Integer> exportCount(MonitorWoExcelDTO dto) {
        return success(service.exportCount(dto));
    }

    @Override
    public Result<Page<MonitorWoExcelVO>> export(MonitorWoExcelDTO dto) {
        return success(service.export(dto));
    }

    @Override
    public  Result<Boolean>  sendMqMessage(List<MonitorWoAddDTO> list ) {
        return success(service.sendMqMessage(list));
    }

}
